import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooDeveloperController } from '../../../controllers';
const uctoodeveloperRouter = new Router();
const developerController = new uctooDeveloperController();

uctoodeveloperRouter.post('/add', requireUser, developerController.add);
uctoodeveloperRouter.post('/edit', requireUser, rowLevelPermission('uctoo/developer'), developerController.edit);
uctoodeveloperRouter.post('/del', requireUser, rowLevelPermission('uctoo/developer'), developerController.delete);

//For getting developer with permission control
uctoodeveloperRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/developer'), developerController.getSingle);
uctoodeveloperRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/developer'), developerController.getMany);
uctoodeveloperRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/developer'), developerController.getMany);

//#endregion AutoCreateCode
export default uctoodeveloperRouter;
